
package cs.remoteapp;
/**
 * The FileRequest class permits the user to ask a remote user to accept or reject the upload
 * @author      4INFO - A1
 * @version     1.0
 */
public class FileRequest extends Message {
	/**
	 * Serialization id
	 */
	private static final long serialVersionUID = 5273187185766280396L;
	/**
	 * Name of the file that will be sent
	 */
	private String fileName;
	/**
	 * Size in bytes of the file that will be sent
	 * Max size = 2^63 - 1 bytes ~= 9.22 Exabytes 
	 */
	private long fileSize;
	
	/**
	 * constructor
	 * @param username Name of the sender
	 * @param fileName Name of the file
	 * @param fileSize Size of the file
	 */
	public FileRequest(String username, String fileName, long fileSize) {
		super(username);
		this.fileName = fileName;
		this.fileSize = fileSize;
	}

	/**
	 * Get the file name
	 * @return the file name
	 */
	public String getFileName() {
		return fileName;
	}

	/**
	 * Get the file size in bytes
	 * @return The file size in bytes
	 */
	public long getFileSize() {
		return fileSize;
	}
}
